import socket
def get_host_ip():
    try:
        s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
        s.connect(('8.8.8.8', 80))
        ip = s.getsockname()[0]
    finally:
        s.close()
    return ip

class PRD():
    ##▁▂▃▅▆▇_____________________app-server 信息___________________________▇▆▅▃▂▁
    HOST = get_host_ip()
    PORT = 5000

    REDIS_CONFIG = {

        "host": "127.0.0.1",
        "port": 6379,
        "password": "",

    }

    #postgresql
    PG_APP_CONF={
        'host': '127.0.0.1',
        'port': "5432",
        'user': 'postgres',
        'dbname': 'test',
        'password': '123456'
    
    }

    MYSQL_APP_CONF={
        'host': '127.0.0.1',
        'port': "3306",
        'user': 'root',
        'dbname': 'test',
        'password': '123456'
    
    }